//
// Created by YeMingMing on 2024-03-06.
//

#include <stdio.h>
// 完美乘法
int main() {
    int f[10],s[3];
    for (int a = 12; a < 999;a++) {
        for (int i = 0;i<10;i++) {
            f[i] = 0;
        }
        for (int b = 345;b<9999;b++) {
            s[0] = a; s[1]= b; s[2] = a*b;
            for (int i=0;i<3;i++) {
                int y  = s[i];
                while (y) {
                    f[y%10]++;
                    y /= 10;
                }
            }
            int n = 0;
            for (int i=0;i<10;i++) {
                if (f[i] > 1) {
                    n++;
                }
            }
            if (n == 0) {
                printf("%d*%d=%d\n",s[0],s[1],s[2]);
            }
        }
    }

    return 0;
}
